package priv.menguer.singleton;

/**
 * 杩�绉��瑰��峰�寰�濂界�� lazy loading锛��藉��ㄥ�绾跨�涓�寰�濂界��宸ヤ�锛�浣���锛�����寰�浣�锛�99% ���典�涓���瑕���姝ャ�� 浼��癸�绗�涓�娆¤��ㄦ����濮���锛��垮����瀛�娴�璐广��
 * <p>
 * 缂虹�癸�蹇�椤诲���� synchronized ���戒�璇���渚�锛�浣�����浼�褰卞��������
 * </p>
 */
public class Singleton2 {
	private static Singleton2 instance;

	private Singleton2() {
	}

	public static synchronized Singleton2 getInstance() {
		if (instance == null) {
			instance = new Singleton2();
		}
		return instance;
	}
}
